package com.scaffold.card.entity;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/*
 * 使用元素对象模型描述：
 * Element e = new Element();
 * e.setAttribute("type","wangjg.xuexiban.Cardname");
 * e.setAttribute("language",language);
 * e.setAttribute("name",name);
 * e.setAttribute("speech_path",speech_path);
 */
@Entity
public class CardName {
	@Id
	@GeneratedValue(strategy = IDENTITY)
	private Long id;
	@Column(length = 20)
	private String language;
	private String name;
	//声音 @audio
	private String speech;
	@Column(nullable = false)
	private Long cardId;
	
	public CardName() {
	}
	public CardName(String language, String name, String speechUrl) {
		this.language = language;
		this.name = name;
		this.speech = speechUrl;
	}
	public String getSpeech() {
		return speech;
	}
	public void setSpeech(String speech_path) {
		this.speech = speech_path;
	}
	public String getLanguage() {
		return language;
	}
	public void setLanguage(String language) {
		this.language = language;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public Long getCardId() {
		return cardId;
	}
	public void setCardId(Long cardId) {
		this.cardId = cardId;
	}
	@Override
	public String toString() {
		return "CardName [language=" + language + ", name=" + name
				+ ", speech_path=" + speech + "]";
	}
	
}
